/**
 * 学习目标：掌握泛型接口的使用
 * 作用： 描述大量相似手挽手数据结构
 * 语法：interface IXxx<T> {}
 */

interface IResponse<T> {
  success: boolean,
  message: string,
  code: number;
  data: T;
};

const userListData: IResponse<{ rows: string[]; total: number }> = {
  success: true,
  message: '请求成功',
  code: 200,
  data: [] as any
};

const roleListData: IResponse<{ list: string[] }> = {
  success: true,
  message: '请求成功',
  code: 200,
  data: [] as any
};